using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MiaoHarmonyTest
{
	public static class Path
	{

		public static void Call_Prefix()
		{
			Console.WriteLine("前缀生效");
		}


		/// <summary>
		/// bool 决定是否执行其他前缀和原始方法
		/// 前缀输入的返回值和实际运行的返回值好像是两个东西
		/// </summary>
		/// <param name="__instance"></param>
		/// <param name="__result=返回值"></param>
		public static bool Add_Prefix(Original __instance,ref OriginalValue __result, OriginalValue value)//, Original __result//设置的值
		{
			//if(__result .AddIndex== 200)
			//{
			//	//__result = 1;
			//	//return false;
			//}
			value.AddIndex += 10;
			Console.WriteLine("覆写已生效");
			return true;
		}

		/// <summary>  n
		/// 后缀，无返回值
		/// </summary>
		/// <returns></returns>
		public static void Add_Postfix(Original __instance)
		{
			__instance.AddIndex += 1;
		}
	}
}
